{{include file="header_inc.html"}}
<style type="text/css">
.line_ff9966,.line_ff9966:hover td {
	background-color: #FF9966;
}

.line_fbffe4,.line_fbffe4:hover td {
	background-color: #fbffe4;
}
</style>
<SCRIPT>	function select_list(obj, title, id) {
		var relation_ids = window.top.$('#relation').val();
		var sid = 'v1' + id;
		if ($(obj).attr('class') == 'line_ff9966'
				|| $(obj).attr('class') == null) {
			$(obj).attr('class', 'line_fbffe4');
			window.top.$('#' + sid).remove();
			if (relation_ids != '') {
				var r_arr = relation_ids.split('|');
				var newrelation_ids = '';
				$.each(r_arr, function(i, n) {
					if (n != id) {
						if (i == 0) {
							newrelation_ids = n;
						} else {
							newrelation_ids = newrelation_ids + '|' + n;
						}
					}
				});
				window.top.$('#relation').val(newrelation_ids);
			}
		} else {
			$(obj).attr('class', 'line_ff9966');
			var str = "<li id='"+sid+"'>·<span>"
					+ title
					+ "</span><a href='javascript:;' class='close' onclick=\"remove_relation('"
					+ sid + "'," + id + ")\"></a></li>";
			window.top.$('#relation_text').append(str);
			if (relation_ids == '') {
				window.top.$('#relation').val(id);
			} else {
				relation_ids = relation_ids + '|' + id;
				window.top.$('#relation').val(relation_ids);
			}
		}
	}
</SCRIPT>
<body>
	<div class="pad-10">
		<form name="searchform" action="" method="get">
			<table width="100%" cellspacing="0" class="search-form">
				<tbody>
					<tr>
						<td align="center">
							<div class="explain-col">
								<select name="field">
									<option value='title'>标题</option>
									<option value='keywords'>关键词</option>
									<option value='description'>描述</option>
									<option value='id'>ID</option>
								</select> <select name="catid"><option value='0'>不限栏目</option>
								{{foreach item=content from=$Category_List}}
									<option value='{{$content.id}}'>{{$content.catname}}</option>
								{{/foreach}}	
								</select> <input name="keywords" type="text" value=""
									style="width: 330px;" class="input-text" /> <input
									type="submit" name="dosubmit" class="button" value="搜索" />
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</form>
		<div class="table-list">
			<table width="100%" cellspacing="0">
				<thead>
					<tr>
						<th>标题</th>
						<th width="100">所属栏目</th>
						<th width="100">添加时间</th>
					</tr>
				</thead>
				<tbody>
					{{foreach item=content from=$News_list}}
					<tr
						onclick="select_list(this,'{{$content.title}}',{{$content.id}})"
						class="cu" title="点击选择">
						<td align='left'>{{$content.title}}</td>
						<td align='center'>{{$Category_Info.catname}}</td>
						<td align='center'>{{$content.createtime}}</td>
					</tr>
					{{/foreach}}
				</tbody>
			</table>
			<div id="pages">{{$pageBlock}}</div>

		</div>
	</div>
</body>
{{include file="footer.html"}}
